<?php

	class Devmod_method_castField_sql_list extends Devmod_castField_abstraction {
		
		public function type_edit() {

			$this->args['where'] = str_replace("%%param%%", $this->config['edit']['where_get'], $this->args['where']);
			
			$this->view->assign('query_obj', $this->db->select($this->args['table'], $this->args['fields'], $this->helper->eval_vars($this->args['where'], $this->row_value)));
			
			return $this->view->fetch('common/cast_sql_list.tpl');
			
		}
		
		public function type_list() {
			
			$this->view->assign('query_obj', $this->db->select($this->args['table'], $this->args['fields'], $this->helper->eval_vars($this->args['where'], $this->row_value), true));
			
			return $this->view->fetch('common/cast_sql_list.tpl');
			
		}
		
		
	}